<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="referrer" content="never"> 
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="../../css/utils/mui.min.css" />
	<link rel="stylesheet" href="../../css/utils/common.css" />
	<title>商品详情</title>
	<style>
		body {
			padding: 0;
			margin: 0;
			font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
			font-size: 14px;
			background-color: #fff;
		}
		.content {
			
		}
		.mui-slider {
			height: 200px;
		}
		.mui-slider .mui-slider-group .mui-slider-item img {
			height: 200px;
		}
		.goods-info {
			display: flex;
			display: -webkit-flex;
			justify-content: space-between;
			margin-top: 10px;
		}
		.goods-price {
    		margin-left: 14px;
	    }
	    .symbol-span {
    		font-size: 10px;
    		color: #E58014;
    		font-family: "PingFang-SC-Regular";
	    }
	    .price-span {
    		font-size: 18px;
    		color: #E58014;
    		font-family: "PingFang-SC-Regular";
	    }
	    .goods-name {
	    	margin-top: 5px;
    		color: #505050;
    		font-family: "PingFang-SC-Regular";
    		padding-left: 14px;
    		font-size: 16px;
	    }
	    .goods-left {
	    	width: calc(100% - 100px);
	    }
	    .goods-right {
	    	margin-right: 10px;
	    }
	    .goods-right .btn-red {
	    	padding: 2px 12px;
	    	margin-bottom: 3px;
	    	background-color: #eb4800;
			border-radius: 10px;
			color: #fff;
			border: none;
	    }
	    .goods-right .btn-blue {
	    	margin-top: 5px;
	    	padding: 2px 12px;
	    	background-color: #008f7c;
			border-radius: 10px;
			color: #fff;
			border: none;
	    }
	    .line-div {
			width: 92%;
			height: 1px;
			margin-top: 5px;
			margin-left: 4%;
			background-color: #C5C5C5;
		}
		.goods-detail-div {
			margin-top: 10px;
			width: 100%;
			margin-bottom: 50px;
		}
		.goods-detail-title-div{
			padding: 10px 0;
			background: #f7f7f7;
			text-align: center;
		}
		.line-span {
			display: inline-block;
			vertical-align: middle;
			margin: 0 10px;
			width: 30px;
			height: 1px;
			background-color: #C5C5C5;
		}
		.line-font {
			display: inline-block;
			vertical-align: middle;
			font-size: 13px;
			color: #333;
		}
		.goods_title-icon {
		    width: 16px;
		    height: 15px;
		    vertical-align: middle;
		}
		.goods_title {
			color: #737373;
			font-size: 15px;
			font-family: "PingFang-SC-Regular";
		}
		#infoImageList img {
			width: 100%;
		    display: block;
		}
		.mui-bar .mui-btn-block {
			top: 0;
		}
		.buy-now {
			height: 49px;
			color:#fff;
			font-family: "PingFang-SC-Regular"; 
			background:#fb511f;
		}
		.bounced-box-container {
			display: none;
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
		    z-index: 11;
	        overflow-y: scroll;
			background-color: rgba(0, 0, 0, 0.7);
		}
		.bounced-box-container .outside {
			width: 100%;
			height: 430px;
			position: absolute;
			left: 0px;
			bottom: 0px;
			background-color: #FFFFFF;
		}
		.goods-logo {
			position: absolute;
			top: -20px;
			left: 14px;
			width: 111px;
			height: 111px;
			padding: 1px;
			border: 1px solid #A1A1A1;
		}
		.goods-logo img {
			width: 100%;
    		height: 100%;
		}
		.standard-details {
			margin-top: 10px;
			margin-left: 135px;
			font-size: 13px;
		    font-family: "PingFang-SC-Regular";
    		color: #B1B1B1;
		}
		.close-div {
		    position: absolute;
		    top: 10px;
		    right: 10px;
			width: 20px;
			height: 20px;
			background-image: url(../../img/phone/close_icon.png);
			background-size: 100% 100%;
		}
		.item-specifications {
			margin: 10px 14px 0px 14px;
		}
		.specifications-title {
			font-size: 10px;
			color: #717171;
			font-family: "PingFang-SC-Regular";
		}
		.mark-title-container {
			margin-top: 8px;
		}
		.specifications-item-title {
			height: 30px;
			margin-bottom: 10px;
			border:1px solid #C5C5C5;
			border-radius: 15px;
			margin-right: 10px;
			padding: 0px 20px;
			display: inline-block;
			line-height: 30px;
			font-size: 13px;
			font-family: "PingFang-SC-Regular";
		}
		.specifications-item-title.selected {
		    color: #FFFFFF;
			background-color: #f96b20;
		}
		.mui-input-row {
			margin-top: 10px;
		}
		.buy-confim {
			position: fixed;
			bottom: 0;
			margin-bottom: 0;
			height: 49px;
			color:#fff;
			font-family: "PingFang-SC-Regular"; 
			background:#fb511f;
		}
		/**------代金券打折券------**/
		.item-div {
			display: none;
			margin-left: 14px;
			margin-right: 14px;
			height: 40px;
			position: relative;
		}
		.item-span {
			flex: 1;
			font-size: 15px;
			color: #515151;
			line-height: 40px;
			font-family: "PingFang-SC-ExtraLight";
		}
		.item-tips-span {
			padding: 2px 5px;
			background-color: #E58014;
			font-size: 12px;
			color: #FFFFFF;
			border-radius: 5px;
			margin-left: 15px;
		}
		.right-div {
			display: inline-block;
			float: right;
			height: 40px;
		}
		.choose-img {
			margin-top: 11px;
			width: 11px;
			height: 18px;
			vertical-align: middle;
		}
		.get-vouchers-box-container {
			display: none;
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
		    z-index: 12;
			background-color: rgba(0, 0, 0, 0.7);
		}
		.get-vouchers-box-container .outside {
			width: 100%;
			height: 75%;
			position: absolute;
			left: 0px;
			bottom: 0px;
			background-color: #FFFFFF;
			overflow-y: auto;
			padding-bottom: 60px;
		}
		.vouchers-title {
			width: 100%;
			height: 40px;
			text-align: center;
			line-height: 40px;
			font-size: 14px;
			color: #737373;
		}
		.vouchers-container {
			width: 96%;
			margin-left: 2%;
			height: 100px;
			background-image: url(../../img/myExtension/vouchers_bg.png);
			background-size: 100% 100%;
			position: relative;
			margin-bottom: 10px;
		}
		.vouchers-price {
			padding-left: 18px;
    			padding-top: 35px;
		}
		.vouchers-price .symbol {
		    text-align: end;
		    font-size: 15px;
		}
		.vouchers-price .price {
			font-size: 35px;
		    font-weight: 400;
		}
		.vouchers-price-color {
			color: #FF5000;	
		}
		.discount-price-color {
			color: #F72939;
		}
		.receive-color {
			color: #333333;
		}
		.vouchers-price .title {
		    font-size: 15px;
		    font-weight: 400;
		    vertical-align: text-bottom;
		}
		.get-vocuchers-container {
			height: 100px;
			width: 30%;
			position: absolute;
			right: 0px;
			top: 0px;
			text-align: center;
		}
		.get-vocuchers {
			line-height: 100px;
			font-size: 18px;
		}
		.vocuchers-color {
			color: #FF7C41;
		}
		.discount-color {
			color: #FC4785;
		}
		.validity_time-div {
			position: absolute;
			bottom: 5px;
			left: 25px;
		}
		.validity_time {
		    font-size: 12px;
		}
		.unused {
			float: right;
			font-size: 10px;
		    margin-top: 3px;
    			margin-right: 2px;
		}
		.vouchers-type, .vouchers-id {
			display: none;
		}
		.yesMember {
			display: none;
		}
		.modal-backdrop {
			display: none;
		}
		.frame-case {
			display: none;
			position: fixed;
			top: 20%;
			left: 50%;
			margin-left: -130px;
			width: 259px;
			height: 307px;
			background: url(../../img/phone/erweima-back.png);
			background-size: 100% 100%;
			z-index: 1050;
		}
		.close-case {
			position: absolute;
			bottom: 0;
			left: 50%;
			margin-left: -19px;
			margin-bottom: -50px;
			width: 37px;
			height: 37px;
			background: url(../../img/phone/close-case.png);
			background-size: 100% 100% ;
		}
		.qrcode-code {
			width: 206px;
			height: 206px;
			margin-top: 20px;
			margin-left: 26px;
			/*border: 1px solid #333;*/
		}
		.qrcode-code img {
			width: 100%;
			height: 100%;
		}
		.font-prompt {
			position: absolute;
			left: 10px;
			bottom: 10px;
			font-size: 15px;
		}
		.freight {
			margin-top: 10px;
			margin-left: 14px;
			font-size: 12px;
			color: #666666;
		}
	</style>
</head>
<body>
	<div class="goods-content">
		<div id="slider" class="mui-slider" >
			<div class="mui-slider-group mui-slider-loop">
				<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
				<div class="mui-slider-item mui-slider-item-duplicate">
					<a href="#">
						<img src="../../img/myExtension/banner.png">
					</a>
				</div>
				<!-- 第一张 -->
				<div class="mui-slider-item">
					<a href="#">
						<img src="../../img/myExtension/banner.png">
					</a>
				</div>
				<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
				<div class="mui-slider-item mui-slider-item-duplicate">
					<a href="#">
						<img src="../../img/myExtension/banner.png">
					</a>
				</div>
			</div>
			<div class="mui-slider-indicator">
				<div class="mui-indicator mui-active"></div>
			</div>
		</div>
		<div class="goods-info">
			<div class="goods-left">
				<div class="goods-price"><span class="symbol-span">¥</span><span class="price-span"></span></div>
				<div class="goods-name"></div>
			</div>
			<div class="goods-right">
				<div class="noMember">
					<button type="button" id="applyMember" class="mui-btn btn-red">申请会员</button>	
				</div>
				<div class="yesMember">
					<button type="button" id="joinMember" class="mui-btn btn-red">个人收益</button><br />
					<button type="button" id="createPosterImg" class="mui-btn btn-blue">我的海报</button>
				</div>
			</div>
		</div>
		<div class="freight">
			<span>运费：¥<span class="logistics_fee"></span></span>
			<span>&nbsp;/&nbsp;&nbsp;满：¥<span class="free_logistics"></span>&nbsp;可免运费</span>
		</div>
		<!--<div class="line-div"></div>-->
		<div class="item-div">
			<span class="item-span">领券</span>
			<span class="item-tips-span">本店专属券</span>
			<div class="right-div">
				<img class="choose-img" src="../../img/phone/go_icon.png" />
			</div>
		</div>
		<div class="goods-detail-div">
			<div class="goods-detail-title-div">
				<div class="line-span"></div><div class="line-font">宝贝详情</div><div class="line-span"></div>
			</div>
			<div id="infoImageList">
			</div>
		</div>
		<div class="bounced-box-container">
			<div class="outside">
				<div class="goods-logo"></div>
				<div class="standard-details">
					<div class="standard-price"><span class="symbol-span">¥</span><span class="price-span"></span></div>
					<div class="standard-stock">库存：</div>
        			<div class="standard-limited">限购：</div>
				</div>
				<div class="close-div"></div>
				<div class="line-div" style="margin-top: 26px;"></div>
				<div id="specificationsID">
					<div class="item-specifications">
						<div class="specifications-title">请选择规格</div>
						<div class="mark-title-container">
							<!--<div class="specifications-item-title selected">红色发送到</div>-->
						</div>
					</div>
				</div>
				<div class="line-div" style="margin-top: 10px;"></div>
				<div class="mui-input-row">
					<label>购买数量</label>
					<div class="mui-numbox" data-numbox-min='1'>
						<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
						<input id="purchaseNum" class="mui-input-numbox" type="number" value="1">
						<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
					</div>
				</div>
				<button type="button" type="button" class="mui-btn mui-btn-block buy-confim">确认</button>
			</div>
		</div>
		<nav class="mui-bar mui-bar-tab">
			<button type="button" type="button" class="mui-btn mui-btn-block buy-now">立即购买</button>
		</nav>
		<div class="get-vouchers-box-container">
			<div class="outside">
				<!--<div class="vouchers-title">店铺优惠券</div>
				<div class="vouchers-container">
            			<div class="vouchers-price">
            				<span class="symbol">¥</span>
            				<span id="vouchersPriceSpan" class="price">0</span>
            				<span class="title">代金券</span>
            			</div>
            			<div class="validity_time-div">
            				<span id="vouchersValidityTime" class="validity_time"></span>
            				<span class="unused">未使用</span>
            			</div>
            			<div class="get-vocuchers-container">
            				<div class="get-vocuchers">立即领取</div>
            			</div>
              	</div>-->
			</div>
			<button type="button" type="button" class="mui-btn mui-btn-block buy-confim">完成</button>
		</div>
		<div class="modal-backdrop"></div>
		<div class="frame-case">
			<div class="close-case"></div>
			<div class="qrcode-code">
				<img src="../../img/phone/zhaixiaou-qrcode.jpg" />
			</div>
			<div class="font-prompt"></div>
		</div>
	</div>
	<script type="text/javascript" src="../../js/utils/mui.min.js" ></script>
	<script type="text/javascript" src="../../js/utils/jquery-1.12.4.min.js" ></script>
	<script type="text/javascript" src="../../js/utils/boot.js" ></script>
	<script>
		mui.init();
		var goodsID = base.getParameter("goodsID");
		var userID = base.getParameter("userID");
		var companyID = base.getParameter("companyID");
		var customerID = base.getParameter("customerID");
		var articleID = base.getParameter("articleID");
		var isMember=0;
		var allVouchersList = [];
		$(function(){
			base.postData(base.url.getOneGoods, {companyID: companyID, goodsID:goodsID, customerID: customerID}, function(data){
				if (data.success) {
					initGoods(data.context);
				}
			});
			base.postData(base.url.getCustomerInfo, {customerID:customerID,companyID,companyID}, function (data) {
				if (data.success) {
					isMember = data.context.isMember;
					if (isMember == 1 && data.context.subscribe == 1) {
						$(".yesMember").show();
						$(".noMember").hide();
					}
				}
			});
		});
		function initGoods(data){
			$(".goods-price .price-span").html(data.price);
			$(".goods-name").html(data.title);
			pingSlider(data.BannerImgList);
			var imgText = "";
			for(var index in data.imgText) {
				imgText += '<img src="'+data.imgText[index]+'">';
			}
			$("#infoImageList").html(imgText);
			$(".goods-logo").html('<img src="'+data.previewImg+'">');
			$(".logistics_fee").text(data.logisticsFee);
			if (data.freeLogistics > 0) {
				$(".free_logistics").text(data.freeLogistics);	
			}else{
				$(".free_logistics").parent("span").hide();
			}
			var standard = "";
			for (var index in data.goodsSpecList) {
				if (index == 0) {
					$(".standard-price .price-span").html(data.goodsSpecList[index].specPrice);
					$(".standard-stock").html("库存："+data.goodsSpecList[index].stock);
					if (data.goodsSpecList[index].constraintPurchase == 0) {
						$(".standard-limited").html("限购：不限购");
					}else {
						$(".standard-limited").html("限购："+data.goodsSpecList[index].constraintPurchase);
					}
					standard += '<div data-id="'+data.goodsSpecList[index].id+'" data-price="'+data.goodsSpecList[index].specPrice+'" data-stock="'+data.goodsSpecList[index].stock+'" data-limited="'+data.goodsSpecList[index].constraintPurchase+'" class="specifications-item-title selected">'+data.goodsSpecList[index].specName+'</div>';
				}else{
					standard += '<div data-id="'+data.goodsSpecList[index].id+'" data-price="'+data.goodsSpecList[index].specPrice+'" data-stock="'+data.goodsSpecList[index].stock+'" data-limited="'+data.goodsSpecList[index].constraintPurchase+'" class="specifications-item-title">'+data.goodsSpecList[index].specName+'</div>';
				}
			}
			$(".mark-title-container").html(standard);
			//代金券
			allVouchersList = data.vouchersList.concat(data.discountCouponsList);
			if (allVouchersList.length > 0) {
				$(".item-div").show();
				$(".get-vouchers-box-container .outside").html(getVouchersListHtml(allVouchersList));
			}
		}
		function pingSlider(data){
			var point = '';
			var html = 	'<div class="mui-slider-item mui-slider-item-duplicate">'+
						'	<a href="#">'+
						'		<img src="'+data[data.length - 1]+'">'+
						'	</a>'+
						'</div>';
			for (var i in data) {
				html += '<div class="mui-slider-item">'+
						'	<a href="#">'+
						'		<img src="'+data[i]+'">'+
						'	</a>'+
						'</div>';
				if (i == 0) {
					point += '<div class="mui-indicator mui-active"></div>';
				}else{
					point += '<div class="mui-indicator"></div>';
				}
			}
				html += '<div class="mui-slider-item mui-slider-item-duplicate">'+
						'	<a href="#">'+
						'		<img src="'+data[0]+'">'+
						'	</a>'+
						'</div>';
			$(".mui-slider-group").html(html);	
			$(".mui-slider-indicator").html(point);
			var slider = mui("#slider");
			slider.slider({
				interval: 5000
			});
		}
		function getVouchersListHtml(list) {
			var html = '<div class="vouchers-title">店铺优惠券</div>';
			for (var index in list) {
				if (list[index].vouchersType == 1) {
					html += '<div class="vouchers-container" style="background-image: url(../../img/myExtension/vouchers_bg.png);">'
				} else {
					html += '<div class="vouchers-container" style="background-image: url(../../img/myExtension/discount_bg.png);">'
				}
				html += '	<div class="vouchers-price">'
				html += '		<span class="symbol '+(list[index].vouchersType == 1?'vocuchers-color':'discount-color')+'">¥</span>'
				html += '		<span id="vouchersPriceSpan" class="price '+(list[index].vouchersType == 1?'vouchers-price-color':'discount-price-color')+'">'+list[index].discount+'</span>'
				html += '		<span class="title '+(list[index].vouchersType == 1?'vocuchers-color':'discount-color')+'">'+(list[index].vouchersType == 1 ? '代金券':'折')+'</span>'
				if(list[index].vouchersType == 1) {
					html += '		<span class="title" style="margin-left: 15px">'+'满'+list[index].fullRedPrice+'元减'+list[index].discount+'元</span>'
				}
				html += '	</div>'
				html += '	<div class="validity_time-div">'
				html += '		<span id="vouchersValidityTime" class="validity_time '+(list[index].vouchersType == 1?'vocuchers-color':'discount-color')+'">'+list[index].validTime+'</span>'
				html += '	</div>'
				html += '	<div class="get-vocuchers-container">'
				html += '		<div class="vouchers-type">'+list[index].vouchersType+'</div>'
				html += '		<div class="vouchers-id">'+list[index].vouchersID+'</div>'
				html += '		<div class="get-vocuchers '+(list[index].isReceive == 1?'receive-color':list[index].vouchersType == 1?'vocuchers-color':'discount-color')+'">'+(list[index].isReceive == 1?'已领取':'立即领取')+'</div>'
				html += '	</div>'
				html += '</div>'
			}
			return html;
		}
		$(".mark-title-container").on('tap', '.specifications-item-title', function(){
			if ($(this).attr("class").indexOf("selected") != -1) {
				return;
			}
			$(this).parent().find(".specifications-item-title").removeClass("selected");
			$(this).addClass("selected");
			if ($(this).attr("data-limited") != 0 && $("#purchaseNum").val() >= $(this).attr("data-limited")) {
				$("#purchaseNum").val($(this).attr("data-limited"));
			}
			$(".standard-price .price-span").html($("#purchaseNum").val()*$(this).attr("data-price"));
			$(".standard-stock").html("库存："+$(this).attr("data-stock"));
			if ($(this).attr("data-limited") == 0) {
				$(".standard-limited").html("限购：不限购");
			}else {
				$(".standard-limited").html("限购："+$(this).attr("data-limited"));
			}
		});
		$(".mui-bar-tab").on('tap','.buy-now',function(){
			$("body").css("overflow-y", "hidden");
			$(".bounced-box-container").show();
			return false;
		});
		$(".bounced-box-container .outside").on("tap", ".close-div", function() {
			$(".bounced-box-container").hide();
			$("body").css("overflow-y", "auto");
			return false;
		});
		$(".bounced-box-container").on("tap", function(){
		    $(".bounced-box-container").hide();
		    $("body").css("overflow-y", "auto");
		    return false;
		});
		$(".bounced-box-container .outside").on("tap", function(){
		    event.stopPropagation();
		});
		//购物车加减
		$(".mui-numbox").on("tap", ".mui-btn", function(){
			var selected = $(".mark-title-container").find(".specifications-item-title.selected");
			if ($(this).attr("class").indexOf("mui-btn-numbox-plus") != -1) {
				if (selected.attr("data-limited")*1 != 0 && $("#purchaseNum").val()*1 > selected.attr("data-limited")*1) {
					$("#purchaseNum").val(selected.attr("data-limited"));
					return;
				}
				if ($("#purchaseNum").val()*1 > selected.attr("data-stock")*1) {
					$("#purchaseNum").val(selected.attr("data-stock"));
					return;
				}
			}
			$(".standard-price .price-span").html(($("#purchaseNum").val() * selected.attr("data-price")).toFixed(2));
		});
		$('#purchaseNum').bind('input propertychange', function() {
			var selected = $(".mark-title-container").find(".specifications-item-title.selected");
			if (selected.attr("data-limited")*1 != 0 && $("#purchaseNum").val()*1 > selected.attr("data-limited")*1) {
				$("#purchaseNum").val(selected.attr("data-limited"));
				return;
			}
			if ($("#purchaseNum").val()*1 > selected.attr("data-stock")*1) {
				$("#purchaseNum").val(selected.attr("data-stock"));
				return;
			}
		});
		$(".bounced-box-container .outside").on("tap", ".buy-confim", function() {
			var selected = $(".mark-title-container").find(".specifications-item-title.selected");
			if (selected.attr("data-stock")*1 < $("#purchaseNum").val()*1) {
				mui.toast("该商品库存已不足");
				return;
			}
			var goodsSpecID = selected.attr("data-id");
			var param = {
				goodsID:goodsID,
				customerID:customerID,
				articleID:articleID,
				goodsSpecID:goodsSpecID,
				purchaseNum:$("#purchaseNum").val(),
				goodsName:$(".goods-name").text(),
				standardName:selected.text(),
				standardPrice:selected.attr("data-price"),
				goodsImg:$(".goods-logo").find("img").attr("src"),
				logisticsFee:$(".logistics_fee").text(),
				freeLogistics:$(".free_logistics").text()
			}
			window.localStorage.setItem("goodsStandardInfo", JSON.stringify(param));
			window.location.href = "submitOrder.html?goodsID="+goodsID+"&customerID="+customerID+"&goodsSpecID="+goodsSpecID+"&purchaseNum="+$("#purchaseNum").val()+"&standardPrice="+selected.attr("data-price")+"&companyID="+companyID;
		});
		$(".goods-content").on('tap','.item-div',function(){
			$("body").css("overflow-y", "hidden");
			$(".get-vouchers-box-container").show();
			return false;
		});
		$(".get-vouchers-box-container").on('tap','.buy-confim',function(){
			$("body").css("overflow-y", "hidden");
			$(".get-vouchers-box-container").hide();
			return false;
		});
		$(".get-vouchers-box-container").on('tap','.get-vocuchers',function(){
			var _vouchersType = $(this).parent().find(".vouchers-type").text();
			var _vouchersID = $(this).parent().find(".vouchers-id").text();
			var params = {
				goodsID:goodsID,
				userID:userID,
				customerID:customerID,
				companyID:companyID,
				vouchersID:_vouchersID,
				vouchersType:_vouchersType,
				channel:2,
			}
			base.postData(base.url.addUserVouchers, params, function(data) {
				mui.toast(data.msg);
				if(data.success) {
					if (allVouchersList.length > 0) {
						for(var item of allVouchersList) {
							if(item.vouchersID == _vouchersID) {
								item.isReceive = 1;
							}
						}
						$(".get-vouchers-box-container .outside").html(getVouchersListHtml(allVouchersList));
					}
				}
			});
		});
		$("#applyMember").click(function(){
			if (isMember == 0) {
				mui.toast("请先购买商品才能申请会员哦！");
			}else {
				$(".modal-backdrop").show();
				$(".frame-case").show();
				$(".font-prompt").html("长按二维码关注公众号即可成为会员");
			}
		});
		$("#joinMember").click(function(){
			$(".modal-backdrop").show();
			$(".frame-case").show();
			$(".font-prompt").html("长按二维码进入公众号查看我的收益");
		});
		$("#createPosterImg").click(function(){
			//添加生成海报
			window.location.href = "posterImg.html"+window.location.search;
		});
		$(".modal-backdrop").click(function(){
			$(".modal-backdrop").hide();
			$(".frame-case").hide();
		});
		$(".close-case").click(function(){
			$(".modal-backdrop").hide();
			$(".frame-case").hide();
		});
	</script>
</body>
</html>
